home *** CD-ROM | disk | FTP | other *** search
- Path: nntp.teleport.com!usenet
- From: GHouck <hksys@teleport.com>
- Newsgroups: comp.lang.c
- Subject: Re: Copy Binary files to printer
- Date: 21 Apr 1996 05:01:59 GMT
- Organization: systems hk
- Message-ID: <4lcfg7$64r@nadine.teleport.com>
- References: <4l6s6u$3cg@news.accent.net>
- NNTP-Posting-Host: ip-pdx05-35.teleport.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.22 (Windows; I; 32bit)
-
- sgirouard@accent.net (Simon Girouard) wrote:
- >I am writing a C program that simulate the DOS "COPY /B" command but send
- >the file to a printer on a parallel port.
- [snip]
- >
- >The problem is that when writing to a file, it works fine but
- >when writing to the parrallele port "LPT1" it seems to have trouble
- >with the handshake and some garbage gets printed.
- >
- >Is there a way to fix this !
-
- Simon,
-
- I don't think the problem is as much with your program, as
- with the concept, assuming the subject 'Copy Binary files to
- printer' is correct.
-
- If you copy all characters in a binary file to a printer
- (including non-text, unprintable, characters) you are likely
- to perform all manner of odd operations: resets, form-feeds,
- bells, change fonts, etc. The printer is usually only
- expecting printable characters and a few printer-specific
- control-characters.
-
- If you truly want to send a binary file to the printer,
- you will have to convert the unprintable characters
- into something more palatable (printable) first.
-
- Yours, Geoff Houck
-
-